Bicycle is one of main vehicles frequently used by people in daily life. In recent years, there are more and more kinds of bicycles which become better in quality and higher in grade. But as a result, more and more bicycles and electric bicycles are lost. Although bicycle guards are disposed especially in some major places, such as front of doors of shopping malls and front of doors of schools, the bicycles are often stolen. Along with the fear and inconvenience caused by the theft of the bicycles, owners of the bicycles feel annoyed. Chinese patent CN101324978A, with the publication date of Dec. 17, 2008, discloses a burglar alarm for bicycle, including a signal transmitting device and a signal receiving device. The signal transmitting device comprises a power supply, an oscillator connected with the power supply, and a signal transmitter connected with the oscillator. The signal receiving device comprises a power supply, a signal receiver connected with the power supply, and a buzzer connected with the signal receiver. The alarm is divided into two portions, and is inconvenient in use.